using System;
using System.Globalization;
using System.Web.UI;
using System.Web.Security;


namespace Agron.Web.Controls
{
    /// <summary>
    /// Defines the code-behind for the <c>UsageReportControl.ascx</c> <see cref="UserControl"/>.
    /// </summary>
    public partial class UsageReportControl : System.Web.UI.UserControl
    {
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                this.registeredUsersLabel.Text = string.Format(CultureInfo.CurrentCulture, "{0:N0}", Membership.GetAllUsers().Count);
                this.installCountLabel.Text = string.Format(CultureInfo.CurrentCulture, "{0:N0}", Membership.GetAllUsers().Count * 1000);
            }
        }
    }
}